export interface ResponseData {
  code: number
  message: string
  ok: boolean
}

export interface skuAttrValue {
  attrId: number | string
  valueId: number | string
  attrName?: string
}

export type SkuAttrValueList = skuAttrValue[]

export interface skuSaleAttrValue {
  saleAttrId: number | string
  saleAttrValueId: number | string
  saleAttrName?: string
}

export type SkuSaleAttrValueList = skuSaleAttrValue[]

export type skuImage = {
  id: number
  imgUrl: string
}

// sku 对象
export interface SkuData {
  category3Id: number | string
  spuId: string | number
  id: string | number
  tmId: string | number
  skuName: string
  price: string | number
  weight: string | number
  skuDesc: string
  skuAttrValueList: SkuAttrValueList
  skuSaleAttrValueList: SkuSaleAttrValueList
  skuDefaultImg: string
  isSale: number
  skuImageList: skuImage[]
}

// 获取已有的sku接口的返回数据类型
export interface SkuResponseData extends ResponseData {
  data: {
    records: SkuData[]
    total: number
    size: number
    current: number
    orders: []
    optimizeCountSql: boolean
    hitCount: boolean
    countId: null
    maxLimit: null
    searchCount: boolean
    pages: number
  }
}
